//
//  GKZYSortLeftBarButtonItemView.m
//  GKZYAid
//
//  Created by tony on 16/3/2.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "GKZYSortLeftBarButtonItemView.h"
#import "MyDefine.h"


@interface GKZYSortLeftBarButtonItemView ()

@property(nonatomic,strong)UIImageView *image;
@property(nonatomic,strong)UILabel *label;

@end

@implementation GKZYSortLeftBarButtonItemView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addViews];
    }
    return self;
}

-(void)addViews{
    
    self.image = [[UIImageView alloc]initWithFrame:CGRectMake(0, VIEWHEIGHT *0.2, VIEWWIDTH*0.4, VIEWHEIGHT*0.6)];
    self.image.image = [UIImage imageNamed:@"back"];
    self.image.userInteractionEnabled = YES;
    [self addSubview:self.image];
    
    self.label = [[UILabel alloc]initWithFrame:CGRectMake(VIEWWIDTH *0.3, 0, VIEWWIDTH*0.6, VIEWHEIGHT)];
    self.label.text = @"返回";
    self.label.textColor = [UIColor orangeColor];
    self.label.textAlignment = NSTextAlignmentLeft;
    self.label.userInteractionEnabled = YES;
    [self addSubview:self.label];
    
}


-(void)setTitleColor:(UIColor *)color andImage:(UIImage *)image{

    self.image.image = image;
    self.label.textColor = color;

}


@end
